<template>
    <div class="equip-info">
      <div class="botton_sabe">
        <el-button

        v-debounce
          type="primary"
          size="small"
          :icon="Platform"
          @click="SaveBEMProcessDatasD"
          >保存工艺数据</el-button
        >
      </div>
      <div style="display: flex; align-items: center;position: relative;">
        <div class="content_steps_ab" style="position: absolute;">
          <div style='display: flex; align-items: center;width:50%'>
	<span style="font-size:11px;font-weight:bold;color:#13ce66">设计状态：</span>
				<el-steps
				style='width:78%;transform: scale(0.8) translate(-10%,-11%);'
        :space="120"
        :active="activeNumber"
        finish-status="success"
        process-status="finish"
        align-center
        size="small"
       
      >
    
        <el-step  :icon="Edit" >
          <template #icon>
            <el-tooltip
            
placement="top-start"
trigger="hover"
content="设计"
>

<div v-if="activeNumber<=0" @click="changeStatue(10)" class="el-step__icon is-text hand_me"><div class="el-step__icon-inner">1</div></div>

<div style="color:#81cc5c" v-if="activeNumber>=1" @click="(e)=>changeStatue(10,e)" class="el-step__icon is-text  is-success hand_me"><i class="el-icon el-step__icon-inner is-status"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><path fill="currentColor" d="M406.656 706.944 195.84 496.256a32 32 0 1 0-45.248 45.248l256 256 512-512a32 32 0 0 0-45.248-45.248L406.592 706.944z" data-darkreader-inline-fill="" style="--darkreader-inline-fill: currentColor;"></path></svg></i></div>

</el-tooltip>
           
       </template>
        </el-step>
        <el-step :icon="Refresh" >
          <template #icon>
            <el-tooltip
            
placement="top-start"
trigger="hover"
content="校核"
>

<div v-if="activeNumber<=1" @click="changeStatue(20)" class="el-step__icon is-text hand_me"><div class="el-step__icon-inner">2</div></div>

<div  style="color:#81cc5c" v-if="activeNumber>=2" @click="changeStatue(20)" class="el-step__icon is-text is-success hand_me"><i class="el-icon el-step__icon-inner is-status"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><path fill="currentColor" d="M406.656 706.944 195.84 496.256a32 32 0 1 0-45.248 45.248l256 256 512-512a32 32 0 0 0-45.248-45.248L406.592 706.944z" data-darkreader-inline-fill="" style="--darkreader-inline-fill: currentColor;"></path></svg></i></div>

</el-tooltip>
           
       </template>
        </el-step>

      
        <el-step :icon="CircleCheck" >

          

          <template #icon>
            <el-tooltip
            
placement="top-start"
trigger="hover"
content="审核"
>

<div v-if="activeNumber<=2" @click="changeStatue(30)" class="el-step__icon is-text hand_me"><div class="el-step__icon-inner">3</div></div>

<div   style="color:#81cc5c" v-if="activeNumber>=3" @click="changeStatue(30)" class="el-step__icon is-text  is-success hand_me"><i class="el-icon el-step__icon-inner is-status"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><path fill="currentColor" d="M406.656 706.944 195.84 496.256a32 32 0 1 0-45.248 45.248l256 256 512-512a32 32 0 0 0-45.248-45.248L406.592 706.944z" data-darkreader-inline-fill="" style="--darkreader-inline-fill: currentColor;"></path></svg></i></div>

</el-tooltip>
           
       </template>
        </el-step>
     
        <el-step :icon="CircleCheck" >

          

<template #icon>
  <el-tooltip
            
            placement="top-start"
            trigger="hover"
            content="已完成"
            >
            
            <div v-if="activeNumber<=2"  class="el-step__icon is-text"><div class="el-step__icon-inner">4</div></div>
            
            <div style="color:#81cc5c" v-if="activeNumber>=3"  class="el-step__icon is-text is-success"><i class="el-icon el-step__icon-inner is-status"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><path fill="currentColor" d="M406.656 706.944 195.84 496.256a32 32 0 1 0-45.248 45.248l256 256 512-512a32 32 0 0 0-45.248-45.248L406.592 706.944z" data-darkreader-inline-fill="" style="--darkreader-inline-fill: currentColor;"></path></svg></i></div>
            
            </el-tooltip>
 
</template>
</el-step>
      </el-steps>
	</div>

	<div style='display: flex; align-items: center;width:50%;'>
	<span style="font-size:11px;font-weight:bold;color:#1890ff">模型状态：</span>
				<el-steps
				style='width:78%;transform: scale(0.8) translate(-10%,-11%);'
        :space="120"
        :active="activeNumberModel"
        finish-status="success"
        process-status="finish"
        align-center
        size="small"
       
      >
    
        <el-step  :icon="Edit" >
          <template #icon>
            <el-tooltip
            
placement="top-start"
trigger="hover"
content="设计"
>

<div v-if="activeNumberModel<=0" @click="changeStatueModel(10)" class="el-step__icon is-text hand_me"><div class="el-step__icon-inner">1</div></div>

<div style="color:#81cc5c" v-if="activeNumberModel>=1" @click="(e)=>changeStatueModel(10,e)" class="el-step__icon is-text  is-success hand_me"><i class="el-icon el-step__icon-inner is-status"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><path fill="currentColor" d="M406.656 706.944 195.84 496.256a32 32 0 1 0-45.248 45.248l256 256 512-512a32 32 0 0 0-45.248-45.248L406.592 706.944z" data-darkreader-inline-fill="" style="--darkreader-inline-fill: currentColor;"></path></svg></i></div>

</el-tooltip>
           
       </template>
        </el-step>
        <el-step :icon="Refresh" >
          <template #icon>
            <el-tooltip
            
placement="top-start"
trigger="hover"
content="校核"
>

<div v-if="activeNumberModel<=1" @click="changeStatueModel(20)" class="el-step__icon is-text hand_me"><div class="el-step__icon-inner">2</div></div>

<div  style="color:#81cc5c" v-if="activeNumberModel>=2" @click="changeStatueModel(20)" class="hand_me el-step__icon is-text is-success"><i class="el-icon el-step__icon-inner is-status"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><path fill="currentColor" d="M406.656 706.944 195.84 496.256a32 32 0 1 0-45.248 45.248l256 256 512-512a32 32 0 0 0-45.248-45.248L406.592 706.944z" data-darkreader-inline-fill="" style="--darkreader-inline-fill: currentColor;"></path></svg></i></div>

</el-tooltip>
           
       </template>
        </el-step>

      
        <el-step :icon="CircleCheck" >

          

<template #icon>
  <el-tooltip
            
            placement="top-start"
            trigger="hover"
            content="已完成"
            >
            
            <div v-if="activeNumberModel<=1"  class="el-step__icon is-text"><div class="el-step__icon-inner">3</div></div>
            
            <div style="color:#81cc5c" v-if="activeNumberModel>=2"  class="el-step__icon is-text is-success"><i class="el-icon el-step__icon-inner is-status"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><path fill="currentColor" d="M406.656 706.944 195.84 496.256a32 32 0 1 0-45.248 45.248l256 256 512-512a32 32 0 0 0-45.248-45.248L406.592 706.944z" data-darkreader-inline-fill="" style="--darkreader-inline-fill: currentColor;"></path></svg></i></div>
            
            </el-tooltip>
 
</template>
</el-step>
      </el-steps>
	</div>
         
</div>
        
        <h1>工艺设计</h1>
        &nbsp;
  
        <el-popover
     
          :visible="visible"
          placement="bottom-start"
          title="设备信息"
          :width="300"
          trigger="hover"
        >
          <template #reference>
            <el-icon @mouseenter="visible = true">
              <Warning />
            </el-icon>
          </template>
          <div @mouseleave="visible = false">
            <div class="content_detail">
              <div class="item_content_d">
                <div class="fontent_s">设备位号:</div>
                <div>{{ equipInfo.equip_no }}</div>
              </div>
  
              <div class="item_content_d">
                <div class="fontent_s">设备名称:</div>
                <div>{{ equipInfo.equip_name }}</div>
              </div>
  
              <div class="item_content_d">
                <div class="fontent_s">设备形式:</div>
                <div>{{ equipInfo.equip_type }}</div>
              </div>
  
              <div class="item_content_d">
                <div class="fontent_s">设备类型:</div>
                <div>{{ equipInfo.equip_class }}</div>
              </div>
  
              <div class="item_content_d">
                <div class="fontent_s">设计人员:</div>
                <div>{{ equipInfo.equip_designer }}</div>
              </div>
            </div>
  
            <div  v-if='false' class="content_top">
              <el-steps
                :space="100"
                :active="activeNumber < 2 ? activeNumber : 3"
                finish-status="success"
                process-status="finish"
                align-center
                size="small"
                style="font-size: 12px"
              >
                <el-step :icon="Edit" title="设计"></el-step>
                <el-step :icon="Refresh" title="审核"></el-step>
                <el-step :icon="CircleCheck" title="完成"></el-step>
              </el-steps>
  
              <div class="button_item_b">
                <el-popconfirm
                  :teleported="false"
                  placement="top"
                  @confirm="designComplete"
                  title="确定设计完成?"
                >
                  <template #reference>
                    <el-button
                      :icon="Edit"
                      size="small"
                      @mouseenter.stop=""
                      type="primary"
                      >设计完成</el-button
                    >
                  </template>
                </el-popconfirm>
  
                <el-popconfirm
                  :teleported="false"
                  placement="left"
                  @confirm="checkComplete"
                  title="确定审核通过?"
                >
                  <template #reference>
                    <el-button
                      :icon="Refresh"
                      size="small"
                      @mouseenter.stop=""
                      type="success"
                      >审核完成</el-button
                    >
                  </template>
                </el-popconfirm>
              </div>
            </div>
          </div>
        </el-popover>
      </div>
  
      <div v-if='false' class="from_tenbal style2">
        <transition name="el-zoom-in-top">
          <el-form
            v-show="showTran"
            label-position="top"
            :inline="true"
            ref="designformRef"
            size="small"
            label-width="120px"
          >
            <div class="flex_style">
              <el-form-item label="设计压力">
                <el-input
                  class="unit_input"
                  v-model="processForm.design_pressure"
                  placeholder="请输入设计压力"
                  size="small"
                ></el-input>
              </el-form-item>
  
             
              <el-form-item label="设计温度">
                <el-input
                  class="unit_input"
                  v-model="processForm.design_temp"
                  placeholder="请输入壳体设计温度"
                  size="small"
                ></el-input>
              </el-form-item>
  
         
  
              <el-form-item label="直径">
                <el-input
                  class="unit_input"
                  v-model="processForm.diameter"
                  placeholder="请输入直径"
                  size="small"
                ></el-input>
              </el-form-item>

              <el-form-item label="支腿长度">
                <el-input
                  class="unit_input"
                  v-model="processForm.support_leg_length"
                  placeholder="请输入支腿长度"
                  size="small"
                ></el-input>
              </el-form-item>
  
              
  
              <el-form-item label="操作容积">
                <el-input
                  class="unit_input"
                  v-model="processForm.operating_volume"
                  placeholder="请输入操作容积"
                  size="small"
                ></el-input>
              </el-form-item>
  
              <el-form-item label="公称容积">
                <el-input
                  class="unit_input"
                  v-model="processForm.nominal_volume"
                  placeholder="请输入公称容积"
                  size="small"
                ></el-input>
              </el-form-item>
  
              <el-form-item label="基本雪压">
                <el-input
                  class="unit_input"
                  v-model="processForm.basic_snow_load"
                  placeholder="请输入基本雪压"
                  size="small"
                ></el-input>
              </el-form-item>
  
              <el-form-item label="基本风压">
                <el-input
                  class="unit_input"
                  v-model="processForm.basic_wind_pressure"
                  placeholder="请输入基本风压"
                  size="small"
                ></el-input>
              </el-form-item>
  
              <el-form-item label="地震设防烈度">
                <el-input
                  class="unit_input"
                  v-model="processForm.seismic_design_intensity"
                  placeholder="请输入地震设防烈度"
                  size="small"
                ></el-input>
              </el-form-item>
  
              <el-form-item label="介质">
                <el-input
                  class="unit_input"
                  v-model="processForm.fluid"
                  placeholder="请输入介质"
                  size="small"
                ></el-input>
              </el-form-item>

              <el-form-item label="介质特性">
                <el-input
                  class="unit_input"
                  v-model="processForm.fluid_properties"
                  placeholder="介质特性"
                  size="small"
                ></el-input>
              </el-form-item>

              <el-form-item label="介质密度">
                <el-input
                  class="unit_input"
                  v-model="processForm.fluid_density"
                  placeholder="介质密度"
                  size="small"
                ></el-input>
              </el-form-item>

              <el-form-item label="保温厚度">
                <el-input
                  class="unit_input"
                  v-model="processForm.insulation_thickness"
                  placeholder="保温厚度"
                  size="small"
                ></el-input>
              </el-form-item>

              <el-form-item label="容器内主要受压元件材质">
                <el-input
                  class="unit_input"
                  v-model="processForm.main_pressure_comp_matl"
                  placeholder="请输入容器内主要受压元件材质"
                  size="small"
                ></el-input>
              </el-form-item>
         
              <el-form-item label="图纸自然张数">
                <el-input
                  class="unit_input"
                  v-model="processForm.drawings_count"
                  placeholder="请输入图纸自然张数"
                  size="small"
                ></el-input>
              </el-form-item>
  
              <el-form-item label="折A1张数">
                <el-input
                  class="unit_input"
                  v-model="processForm.A1_count"
                  placeholder="请输入折A1张数"
                  size="small"
                ></el-input>
              </el-form-item>
  
              <el-form-item label="计算书自然张数">
                <el-input
                  class="unit_input"
                  v-model="processForm.cal_sheet_count"
                  placeholder="请输入计算书自然张数"
                  size="small"
                ></el-input>
              </el-form-item>
  
              <el-form-item label="备注">
                <el-input
                  class="unit_input"
                  v-model="processForm.note"
                  placeholder="请输入备注"
                  size="small"
                ></el-input>
              </el-form-item>
  
              <el-form-item label="风险评估报告">
                <el-select
                  style="width: 160px"
                  class="unit_input"
                  v-model="processForm.risk_assessment_report"
                  placeholder="请输入风险评估报告"
                  size="small"
                >
                  <el-option
                    v-for="item in [
                      {
                        value: '是',
                        label: '是',
                      },
                      {
                        value: '否',
                        label: '否',
                      },
                    ]"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  ></el-option>
                </el-select>
              </el-form-item>
            </div>
          </el-form>
        </transition>
      </div>

      <div  style='border:1px solid transparent;margin-top:10px'   class="">
			<el-scrollbar height='455px'>
        <div style='padding:0px 10px 5px 0px;' class="table_warp">

        <div class="left_table">
          

          <div class="row font_size_small box_font flex_my">
               <div class="box_font_left height_32 flex_my left_title border_right">设备类别
                
               </div>
               <div class="box_font_right flex_center height_32 flex_my">
				<el-select class='height_100_width_65 font_size_small' size='small' v-model="equipInfo.vessel_type" placeholder="请选择">
                     <el-option
                       v-for="item in [
             {
                    value: 'Ⅰ',
                    label: 'Ⅰ',
                  },
                  {
                    value: 'Ⅱ',
                    label: 'Ⅱ',
                  },
                  {
                    value: 'Ⅲ',
                    label: 'Ⅲ',
                  },
 
                  {
                    value: 'I/SAD',
                    label: 'I/SAD',
                  },
                  {
                    value: 'II/SAD',
                    label: 'II/SAD',
                  },
                  {
                    value: 'III/SAD',
                    label: 'III/SAD',
                  },


                   {
                    value: '类外',
                    label: '类外',
                  },
             ]"
                       :key="item.value"
                       :label="item.label"
                       :value="item.value"
                     ></el-option>
				 </el-select>
               
                  
               </div>
            </div>


			<div class="row font_size_small box_font flex_my color_gray">
               <div class=" height_32 flex_center left_title ">工艺参数</div>
               
            </div>



            <div class="row font_size_small box_font flex_my">
               <div class="box_font_left height_32 flex_my left_title border_right">设计压力 
                （MPa）
               </div>
               <div class="box_font_right flex_center height_32 flex_my">
                  <div class="height_32 flex_center   width_100">
					<div class="height_32 flex_center border_right left_title width_50">
                     <el-input class='height_100_width_65 font_size_small' size='small' v-model='processForm.max_design_pressure_tank'></el-input>
				    </div>
					<div class="height_32 flex_center  width_50">
						<el-input class='height_100_width_65 font_size_small' size='small' v-model='processForm.min_design_pressure_tank'></el-input>
				    </div>
                  </div>
              
               </div>
            </div>

            <div class="row font_size_small box_font flex_my">
               <div class="box_font_left height_32 flex_my left_title border_right">工作压力 
				
               </div>
               <div class="height_32 flex_center box_font_right  left_title ">
					<el-input class='height_100_width_65 font_size_small' size='small' v-model='processForm.operating_pressure_tank'></el-input>
                  </div>
            </div>


            <div class="row font_size_small box_font flex_my">
               <div class="box_font_left height_32 flex_my left_title border_right">最大允许工作压力 
				
               </div>
               <div class="height_32 flex_center box_font_right  left_title ">
					<el-input class='height_100_width_65 font_size_small' size='small' v-model='processForm.mawp_tank'></el-input>
                  </div>
            </div>

            <div class="row font_size_small box_font flex_my">
               <div class="box_font_left height_32 flex_my left_title border_right">设计温度
				
               </div>
               <div class="box_font_right flex_center height_32 flex_my">
                  <div class="height_32 flex_center border_right left_title width_50">
					<el-input class='height_100_width_65 font_size_small' size='small' v-model='processForm.max_design_temp_tank'></el-input>
                  </div>
                  <div class="height_32 flex_center left_title width_50">
					<el-input class='height_100_width_65 font_size_small' size='small' v-model='processForm.min_design_temp_tank'></el-input>
                  </div>
               </div>
            </div>




            <div class="row font_size_small box_font flex_my">
               <div class="box_font_left height_32 flex_my left_title border_right">工作温度 
				
               </div>
               <div class="height_32 flex_center box_font_right  left_title ">
					<el-input class='height_100_width_65 font_size_small' size='small' v-model='processForm.operating_temp_tank'></el-input>
                  </div>
            </div>

	


            <div class="row font_size_small box_font flex_my">
               <div class="box_font_left height_32 flex_my left_title border_right">介质 
				
               </div>
               <div class="height_32 flex_center box_font_right  left_title ">
					<el-input class='height_100_width_65 font_size_small' size='small' v-model='processForm.fluid_tank'></el-input>
                  </div>
            </div>



            
            <div class="row font_size_small box_font flex_my">
               <div class="box_font_left height_32 flex_my left_title border_right">介质特性 
				
               </div>
               <div class="height_32 flex_center box_font_right  left_title ">
					<el-input class='height_100_width_65 font_size_small' size='small' v-model='processForm.fluid_properties_tank'></el-input>
                  </div>
            </div>



            <div class="row font_size_small box_font flex_my">
               <div class="box_font_left height_32 flex_my left_title border_right">介质密度 
				
               </div>
               <div class="height_32 flex_center box_font_right  left_title ">
					<el-input class='height_100_width_65 font_size_small' size='small' v-model='processForm.fluid_density_tank'></el-input>
                  </div>
            </div>



            <div class="row font_size_small box_font flex_my">
               <div class="box_font_left height_32 flex_my left_title border_right">全容积 
				
               </div>
               <div class="height_32 flex_center box_font_right  left_title ">
					<el-input class='height_100_width_65 font_size_small' size='small' v-model='processForm.full_volume_tank'></el-input>
                  </div>
            </div>


            
            <div class="row font_size_small box_font flex_my">
               <div class="box_font_left height_32 flex_my left_title border_right">工作容积 
				
               </div>
               <div class="height_32 flex_center box_font_right  left_title ">
					<el-input class='height_100_width_65 font_size_small' size='small' v-model='processForm.operating_volume_tank'></el-input>
                  </div>
            </div>


            <div class="row font_size_small box_font flex_my">
               <div class="box_font_left height_32 flex_my left_title border_right">安全阀整定压力 
				
               </div>
               <div class="height_32 flex_center box_font_right  left_title ">
					<el-input class='height_100_width_65 font_size_small' size='small' v-model='processForm.safety_valve_set_pressure_tank'></el-input>
                  </div>
            </div>


	
        



			<div class="row font_size_small box_font flex_my">
               <div class="box_font_left height_32 flex_my left_title border_right">主体材料
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				{{ shell_mat1_metaid_ForMatter.CS }} 
               </div>
               <div class="box_font_right flex_center height_32 flex_my">
                  <div class="height_32 flex_center  left_title width_100">
					
					 <el-cascader
					 style='width:80%'
					 class='height_100_width_65 font_size_small'
            
                placeholder='--'
                :show-all-levels="false"
               v-model="shell_mat1_metaid_ForMatter.values" size="small"
                 :options="cascaderOptions"
                     filterable />
				
                  </div>
                 
               </div>
            </div>





            <div class="row font_size_small box_font flex_my">
               <div class="box_font_left height_32 flex_my left_title border_right">腐蚀裕量
				
               </div>
               <div class="height_32 flex_center box_font_right  left_title ">
					<el-input class='height_100_width_65 font_size_small' size='small' v-model='processForm.corrosion_allowance_tank'></el-input>
                  </div>
            </div>
           




            <div class="row font_size_small box_font flex_my">
               <div class="box_font_left height_32 flex_my left_title border_right">公称直径
				
               </div>
               <div class="height_32 flex_center box_font_right  left_title ">
					<el-input class='height_100_width_65 font_size_small' size='small' v-model='processForm.diameter_tank'></el-input>
                  </div>
            </div>






            
			


            <div class="row font_size_small box_font flex_my">
               <div class="box_font_left height_32 flex_my left_title border_right">焊接接头系数
				
               </div>
               <div class="height_32 flex_center box_font_right  left_title ">
					<el-input class='height_100_width_65 font_size_small' size='small' v-model='processForm.weldedjoint_coefficient_tank'></el-input>
                  </div>
            </div>


            
            <div class="row font_size_small box_font flex_my">
               <div class="box_font_left height_32 flex_my left_title border_right">保温材料/厚度
				
               </div>
               <div class="box_font_right flex_center height_32 flex_my">
                  <div class="height_32 flex_center border_right left_title width_50">
					<el-input class='height_100_width_65 font_size_small' size='small' v-model='processForm.insulation_material_tank'></el-input>
                  </div>
                  <div class="height_32 flex_center left_title width_50">
					<el-input class='height_100_width_65 font_size_small' size='small' v-model='processForm.insulation_thickness_tank'></el-input>
                  </div>
               </div>
            </div>
    

            <div class="row font_size_small box_font flex_my">
               <div class="box_font_left height_32 flex_my left_title border_right">装量系数
				
               </div>
               <div class="height_32 flex_center box_font_right  left_title ">
					<el-input class='height_100_width_65 font_size_small' size='small' v-model='processForm.filling_ratio_tank'></el-input>
                  </div>
            </div>

            
            <div class="row font_size_small box_font flex_my">
               <div class="box_font_left height_32 flex_my left_title border_right">支腿长度
				
               </div>
               <div class="height_32 flex_center box_font_right  left_title ">
					<el-input class='height_100_width_65 font_size_small' size='small' v-model='processForm.support_leg_length'></el-input>
                  </div>
            </div>






		   <div class="row font_size_small box_font flex_my color_gray">
               <div class="box_font_left height_32 flex_my left_title ">
				
               </div>
               
            </div>



			
			<div class="row font_size_small box_font flex_my">
           
		   <div class="box_font_left height_32 flex_my left_title border_right">图纸自然张数
			
		   </div>
		   <div class="box_font_right flex_center height_32 flex_my">
			<el-input class='height_100_width_65 font_size_small' size='small' v-model='processForm.drawings_count'></el-input>
		   </div>
		   </div>


		   <div class="row font_size_small box_font flex_my">
           
		   <div class="box_font_left height_32 flex_my left_title border_right">折A1张数
			
		   </div>
		   <div class="box_font_right flex_center height_32 flex_my">
			<el-input class='height_100_width_65 font_size_small' size='small' v-model='processForm.a1_count'></el-input>
		   </div>
		   </div>


		   <div class="row font_size_small box_font flex_my">
           
		   <div class="box_font_left height_32 flex_my left_title border_right">计算书自然张数
			
		   </div>
		   <div class="box_font_right flex_center height_32 flex_my">
			<el-input class='height_100_width_65 font_size_small' size='small' v-model='processForm.cal_sheet_count'></el-input>
		   </div>
		   </div>


		   <div class="row font_size_small box_font flex_my">
           
		   <div class="box_font_left height_32 flex_my left_title border_right">风险评估报告
			
		   </div>
		   <div class="box_font_right flex_center height_32 flex_my">
			<el-input class='height_100_width_65 font_size_small' size='small' v-model='processForm.risk_assessment_report'></el-input>
		   </div>
		   </div>


		   <div class="row font_size_small box_font flex_my">
           
		   <div class="box_font_left height_32 flex_my left_title border_right">备注
			
		   </div>
		   <div class="box_font_right flex_center height_32 flex_my">
			<el-input class='height_100_width_65 font_size_small' size='small' v-model='processForm.note'></el-input>
		   </div>
		   </div>


      </div>
	  </div>
      </el-scrollbar>


		</div>
    </div>
  </template>
    
    <script setup>
  import {
    Check,
    Delete,
    CircleCheck,
    Platform,
    Refresh,
    Edit,
    Message,
    Search,
    Star,
    DocumentCopy,
    Top,
    Bottom,
    Warning,
  } from "@element-plus/icons-vue";
  
  import { ElMessage, ElMessageBox, ElNotification } from "element-plus";
  import {
    defineAsyncComponent,
    ref,
    reactive,
    onMounted,
    nextTick,
    computed,
    watch,
  } from "vue";
  import {
    GetMaterialMetaDatas,
    ModifyEquipModelStatusV2,
    ModifyEquipStatus,
    SaveSphericalTankProcessDatas,
    UpdateEquipVesselType,
    GetSphericalTankProcessDatas,
    calculateshape,
    ImportExcelForModelInput,
    ExportExcelForModelInput,
    
    DeleteNozzle,
    AddNozzle,
    ModifyNozzle,
    GetEquipmentNozzle,
    DeleteAllShape,
    AddShape,
    UpdateLastModifyTime,
    ModifyShape,
    getequipmentshape,
    SaveNozzleDesignDatas,
    saveBEMDesigndatas,
    SaveModelParam,
    DelBEMNozzleDesignDatas,
    GetNozzleReinforcingRingMeta,
    GetNozzleInternalComponentsMeta,
    GetNozzleConnectTubeMaterialMeta,
    GetBEMNozzleDesignDatas,
    getBEMdesigndatas,
    getArrangeAnglemetadatas,
    getbooloptiondatas,
    getGasketTypeMetadatas,
    getStandardMetadatas,
    getRatingMetadatas,
  } from "../../../api/equipment/index";
  import { NozzleInfo as NozzleInfoOptions } from "../../../utils/nozzleTypeInfo";
  import {
    HEquipShapeTypes,
    VEquipShapeTypes,
    ShapeParams,
    NozzleParamOptions,
  } from "../../../assets/js/equiipentBaseDatas";
  import { liftingLegTypes as liftingLegTypesD } from "../../../assets/js/LiftingLug.js";
  import { useEquipmentStore } from "../../../stores/equipment";
import { useRoute } from "vue-router";
  let store = useEquipmentStore();
  const route = useRoute()
  let equip_oid = ref("");
  let equipInfo = ref({});
  let activeNumberModel = ref(0)
  let cascaderOptions =ref([])
  onMounted(async() => {
    equip_oid.value = route.query.equip_oid
    equipInfo.value = JSON.parse(sessionStorage.getItem(equip_oid.value));
    
    getBEMprocessdatasData();
    activeNumber.value = Number(equipInfo.value.equip_check) / 10;
    activeNumberModel.value = Number(equipInfo.value.model_stage) / 10
 
 
    let resCascader = await GetMaterialMetaDatas()
    cascaderOptions.value = transformData(resCascader);
  });
  

  let transformData =(data) =>{
  // 使用对象存储分组结果
  const resultMap = {};

  data.forEach(item => {
    const standard = item.standard;
    const materialType = item.materialType;
    const materialName = item.materialName;

    // 处理标准层级
    if (!resultMap[standard]) {
      resultMap[standard] = {
        value: standard,
        label: standard,
        children: {}
      };
    }

    // 处理材料类型层级
    if (!resultMap[standard].children[materialType]) {
      resultMap[standard].children[materialType] = {
        value: materialType,
        label: materialType,
        children: []
      };
    }

    // 添加材料名称（去重）
    const exists = resultMap[standard].children[materialType].children
      .some(child => child.value === materialName);
      
    if (!exists) {
      resultMap[standard].children[materialType].children.push({
        value: materialName,
        label: materialName
      });
    }
  });

  // 转换为最终数组格式
  return Object.values(resultMap).map(standard => ({
    value: standard.value,
    label: standard.label,
    children: Object.values(standard.children).map(type => ({
      value: type.value,
      label: type.label,
      children: type.children
    }))
  }));
}


  let activeNumber = ref(10);

  let forMatterMetaid = () => {
		processForm.value.main_material_tank = `${shell_mat1_metaid_ForMatter.value.CS}|${shell_mat1_metaid_ForMatter.value.values}`
	
		
		console.log(processForm.value)
	}

  
  let SaveBEMProcessDatasD = async () => {
    try {
      forMatterMetaid()
      sessionStorage.setItem(equip_oid.value, JSON.stringify(equipInfo.value));
  
      let obj = {
        "oid": processForm.value.oid||'',
equip_oid: processForm.value.equip_oid,
max_design_pressure_tank: processForm.value.max_design_pressure_tank,
min_design_pressure_tank: processForm.value.min_design_pressure_tank,
operating_pressure_tank: processForm.value.operating_pressure_tank,
mawp_tank: processForm.value.mawp_tank,
safety_valve_set_pressure_tank: processForm.value.safety_valve_set_pressure_tank,
max_design_temp_tank: processForm.value.max_design_temp_tank,
min_design_temp_tank: processForm.value.min_design_temp_tank,
operating_temp_tank:  processForm.value.operating_temp_tank,
fluid_tank: processForm.value.fluid_tank,
fluid_properties_tank: processForm.value.fluid_properties_tank,
fluid_density_tank: processForm.value.fluid_density_tank,
full_volume_tank: processForm.value.full_volume_tank,
operating_volume_tank: processForm.value.operating_volume_tank,
main_material_tank: processForm.value.main_material_tank,
corrosion_allowance_tank: processForm.value.corrosion_allowance_tank,
diameter_tank: processForm.value.diameter_tank,
weldedjoint_coefficient_tank: processForm.value.weldedjoint_coefficient_tank,
insulation_material_tank: processForm.value.insulation_material_tank,
insulation_thickness_tank: processForm.value.insulation_thickness_tank,
filling_ratio_tank: processForm.value.filling_ratio_tank,
support_leg_length: processForm.value.support_leg_length,
drawings_count: processForm.value.drawings_count,
a1_count: processForm.value.a1_count,
cal_sheet_count: processForm.value.cal_sheet_count,
risk_assessment_report: processForm.value.risk_assessment_report,
note: processForm.value.note,

}
if(!obj.oid) delete obj.oid
      await UpdateEquipVesselType({
         equip_oid:equip_oid.value,
         vessel_type:equipInfo.value.vessel_type
      })
      await SaveSphericalTankProcessDatas({
        ...obj,
        equip_oid:equip_oid.value,
    modify_user:JSON.parse(localStorage.getItem("userMessage")).user_name,
    create_user:JSON.parse(localStorage.getItem("userMessage")).user_name,     
  });
      ElMessage({
        message: "保存工艺数据成功",
        type: "success",
      });

      getBEMprocessdatasData();
    } catch (error) {
      ElMessage({
        message: "请检查工艺参数是否正确",
        type: "error",
      });
    }
  };
  
  let getBEMprocessdatasData = async () => {
    let res = await GetSphericalTankProcessDatas(equip_oid.value);
    
    if (res.length > 0) {
      let obj = res[0]
     for (const key in obj) {
          const lowerkey = key.toLowerCase();
          obj[lowerkey] =  obj[key];
      }
      processForm.value = obj;

      if(processForm.value.main_material_tank&&processForm.value.main_material_tank.includes('|')){
				shell_mat1_metaid_ForMatter.value.CS = processForm.value.main_material_tank.split('|')[0]
				shell_mat1_metaid_ForMatter.value.values = processForm.value.main_material_tank.split('|')[1].split(',')
			}
	
    }
  };
  
  let activeName = ref("管程参数");
  let showTran = ref(false);
  watch(
    activeName,
    () => {
      showTran.value = false;
      setTimeout(() => {
        showTran.value = true;
      }, 30);
    },
    { immediate: true }
  );
  
  let visible = ref(false);
  
  let checkComplete = async () => {
 let res =  await ModifyEquipStatus({
    equip_oid: equip_oid.value,
    equip_check: "30",
    equip_checker: JSON.parse(localStorage.getItem("userMessage")).user_name,
  });
  if(res.data !== 'True'){
    ElMessage({
      message: res.data,
      type: "error",
    });
  }else{
    activeNumber.value = 30;
  equipInfo.value.equip_check = "30";
  sessionStorage.setItem(equip_oid.value, JSON.stringify(equipInfo.value));
  ElMessage({
    message: "设计状态修改成功",
    type: "success",
  });
  await UpdateLastModifyTime({ equip_oid: equip_oid.value });
  }
 
};



let changeStatueModel =  async(num,e) => {
  let str = num === 10 ? '校核' : num === 20 ?  '已完成' : ''
	let bool = await ElMessageBox.confirm(`您确定要把当前状态修改为${str}吗？`, '提示', {
		confirmButtonText: '确定',
		cancelButtonText: '取消',
		type: 'warning',
	})
  if(bool){
	let  res = await ModifyEquipModelStatusV2({
	
	proj_oid: equipInfo.value.proj_oid,
	equip_no: equipInfo.value.equip_no,
	drawing_stage:equipInfo.value.drawing_stage,
	model_stage:num,
  equip_user: JSON.parse(localStorage.getItem("userMessage")).user_name,
});

if(res !== 'True'){
  ElMessage({
	message: res.data,
	type: "error",
  });
}else{
	activeNumberModel.value = num / 10;
	equipInfo.value.model_stage = num ;
sessionStorage.setItem(equip_oid.value, JSON.stringify(equipInfo.value));
ElMessage({
  message: "设计状态修改成功",
  type: "success",
});
await UpdateLastModifyTime({ equip_oid: equip_oid.value });
}

  }


}


let changeStatue =  async(num) => {
   let str = num === 10 ? '校核' : num === 20 ?  '审核' : '已完成'
  let bool = await ElMessageBox.confirm(`您确定要把当前状态修改为${str}吗？`, '提示', {
		confirmButtonText: '确定',
		cancelButtonText: '取消',
		type: 'warning',
	})
  if(bool){
    let  res = await ModifyEquipStatus({
      proj_oid: equipInfo.value.proj_oid,
	equip_no: equipInfo.value.equip_no,
	drawing_stage:equipInfo.value.drawing_stage,
  equip_check: num,
  equip_user: JSON.parse(localStorage.getItem("userMessage")).user_name,
});

if(res !== 'True'){
  ElMessage({
    message: res.data,
    type: "error",
  });
}else{
  activeNumber.value = num / 10;
equipInfo.value.equip_check = num;
sessionStorage.setItem(equip_oid.value, JSON.stringify(equipInfo.value));
ElMessage({
  message: "设计状态修改成功",
  type: "success",
});
await UpdateLastModifyTime({ equip_oid: equip_oid.value });
}

  }

}
  
let designComplete = async () => {
 let  res = await ModifyEquipStatus({
    equip_oid: equip_oid.value,
    equip_check: "20",
    equip_checker: JSON.parse(localStorage.getItem("userMessage")).user_name,
  });

  if(res.data !== 'True'){
    ElMessage({
      message: res.data,
      type: "error",
    });
  }else{
    activeNumber.value = 20;
  equipInfo.value.equip_check = "20";
  sessionStorage.setItem(equip_oid.value, JSON.stringify(equipInfo.value));
  ElMessage({
    message: "设计状态修改成功",
    type: "success",
  });
  await UpdateLastModifyTime({ equip_oid: equip_oid.value });
  }
 
};


let shell_mat1_metaid_ForMatter = ref({
		CS:'--',
		values:'--',
	})

  
  let objForm = {
    // 基本信息表单
    eqpdiameter: "eqpdiameter",
    // 管程表单
    tube_pressure: "tube_pressure",
    tube_design_pressure1: "tube_design_pressure1",
    tube_design_pressure2: "tube_design_pressure2",
    tube_operate_temperature_in: "tube_operate_temperature_in",
    tube_operate_temperature_out: "tube_operate_temperature_out",
    tube_design_temperature1: "tube_design_temperature1",
    tube_design_temperature2: "tube_design_temperature2",
    tube_wall_temperature: "tube_wall_temperature",
    tube_fluidname: "tube_fluidname",
    tube_fluid_property: "tube_fluid_property",
    tube_fluid_density_in: "tube_fluid_density_in",
    tube_fluid_density_out: "tube_fluid_density_out",
    tube_mat1_metaid: "tube_mat1_metaid",
    tube_mat2_metaid: "tube_mat2_metaid",
    heatexchange_tube_metaid: "heatexchange_tube_metaid ",
    tube_corrosion_allowance: "tube_corrosion_allowance ",
    tube_weldedjoint_coefficient: "tube_weldedjoint_coefficient ",
    tube_head_weldedjoint_coefficient: "tube_head_weldedjoint_coefficient ",
    tube_insulation_mat: "tube_insulation_mat ",
    tube_insulation_thickness: "tube_insulation_thickness ",
    tube_inlet_massflow: "tube_inlet_massflow ",
    tube_outlet_massflow: "tube_outlet_massflow ",
    tube_speed: " tube_speed",
    // 壳程表单
    shell_pressure: "shell_pressure ",
    shell_design_pressure1: "shell_design_pressure1 ",
    shell_design_pressure2: "shell_design_pressure2 ",
    shell_operate_temperature_in: "shell_operate_temperature_in ",
    shell_operate_temperature_out: "shell_operate_temperature_out ",
    shell_design_temperature1: "shell_design_temperature1 ",
    shell_design_temperature2: "shell_design_temperature2 ",
    shell_wall_temperature: "shell_wall_temperature ",
    shell_fluidname: " shell_fluidname",
    shell_fluid_property: "shell_fluid_property ",
    shell_fluid_density_in: "shell_fluid_density_in ",
    shell_fluid_density_out: "shell_fluid_density_out ",
    shell_mat1_metaid: " shell_mat1_metaid",
    shell_mat2_metaid: " shell_mat2_metaid",
    shell_corrosion_allowance: "shell_corrosion_allowance ",
    shell_weldedjoint_coefficient: "shell_weldedjoint_coefficient ",
    shell_head_weldedjoint_coefficient: "shell_head_weldedjoint_coefficient ",
    shell_insulation_mat: "shell_insulation_mat ",
    shell_insulation_thickness: " shell_insulation_thickness",
    shell_inlet_massflow: "shell_inlet_massflow ",
    shell_outlet_massflow: " shell_outlet_massflow",
    shell_speed: "shell_speed ",
  };
  let processForm = ref({
    design_pressure: "",
    design_temp: "",
    support_leg_length:'',
    diameter: "",
    operating_volume: "",
    
    nominal_volume: "",
    main_pressure_comp_matl:'',
    basic_snow_load:'',
    basic_wind_pressure:'',
    seismic_design_intensity:'',
    fluid:'',
    fluid_properties:'',
    fluid_in_vessel: "",
    fluid_in_Jacket_coil: "",
    fluid_properties_in_vessel: "",
    fluid_properties_in_Jacket_coil: "",
    main_pressure_comp_matl_in_vessel: "",
    main_pressure_comp_matl_in_Jacket_coil: "",
    drawings_count: "",
    A1_count: "",
    cal_sheet_count: "",
    note: "",
    risk_assessment_report: "",
    fluid_density:'',
    insulation_thickness:'',
  });
  </script>
    
    <style scoped lang="scss">
  .botton_sabe {
    z-index: 777;
    position: absolute;
    top: 15px;
    right: 15px;
  }
  .from_tenbal {
    margin-top: 20px;
  }
  
  .fontent_s {
    font-weight: bolder;
  }
  
  .item_content_d {
    padding: 5px 15px;
    border-bottom: 1px dashed #ccc;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  
  .equip-info {
    position: relative;
    background-color: #fff;
    padding: 20px;
    border-radius: 4px;
  }
  
  .flex_style {
    margin-top: 20px;
    width: 100%;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
  }
  
  .equip-info {

    height: 520px;
  }
  .content_top {
    margin-top: 30px;
  }
  .button_item_b {
    margin-top: 20px;
    padding: 0 30px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  ::v-deep(.el-form-item) {
  margin-bottom: 10px;
  margin-right: 6px;
}

::v-deep(.style2){
  .el-input--small{
    width: 144px;
  }
}

.content_steps_ab{

  display:flex;
		left: 10%;
top: 41%;
transform: translate(0%,-50%) scale(0.9);

width: 80%;
}



.table_warp{
    display: flex;
    
    width: 100%;
    .height_32{
      height: 26px;
    }
  .flex_my{
    display: flex;
    align-items: center;
  }
  .flex_center{
    display: flex;
    align-items: center;
   justify-content: center;
  }
  .left_title{

    
    white-space: pre;
    font-weight: bolder;
  }
  .box_font_left{
    
    width: 34%;
  }
  .box_font_right{
    
    width: 66%;
  }
  .font_size_small{
    font-size: 12px;
  }
  .row{
    padding-left: 10px;
    border-bottom:1px solid #999 ;
  }
    .box1{
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .font_weight{
      font-weight: bolder;
      font-size: 17px;
    }
    .border_left{
      border-left: 1px solid #999;
    }
    .border_top{
      border-top: 1px solid #999;
    }
    .border_right{
      
      border-right: 1px solid #999;
    }
    .border_bottom{
      border-bottom: 1px solid #999;
    }
    .left_table{
      width: 100%;
      border: 3px solid rgb(13, 88, 173);
      border-left:3px solid rgb(13, 88, 173);
      border-bottom:3px solid rgb(13, 88, 173);

      border-top:3px solid rgb(13, 88, 173);
    }
    .height_100_width_65{
      height: 94%;
      width: 100%;
    }
    .width_50{
      width: 50%;
    }
    .width_10{
      width: 10%;
    }
    .flex{
      display: flex;
    }
    .width_22{
      width:22.5%
    }
    .width_20{
      width: 18.9%;
    }
    
    .width_90{
      width: 90%;
    }

    .width_30{
      width: 30%;
    }
    .rl{
      writing-mode: vertical-rl;
    }
    .height_100{
      height: 100%;
    }
    .right_table{
      width: 58%;
      border: 1px solid rgb(13, 88, 173);
      border-right:3px solid rgb(13, 88, 173);
      border-bottom:3px solid rgb(13, 88, 173);

      border-top:3px solid rgb(13, 88, 173);
    }
    .all_table{
      border: 1px solid rgb(13, 88, 173);
      border-right:3px solid rgb(13, 88, 173);
      border-bottom:3px solid rgb(13, 88, 173);
      border-left:3px solid rgb(13, 88, 173);
      border-top:3px solid rgb(13, 88, 173);
      width: 100%;
     
    }
    .over_y{
      overflow-y: scroll;
    }
    .no_left_padding{
      padding-left: 0;
    }
    .padding_left_10{
      padding-left: 10px;
    }
    .width_25{
      width: 25.5%;
    }
    .width_my_1{
      width:38%
    }

    .width_1{
      width:6%
    }
    .width_2{
      width:8%
    }
    .width_3{
      width:8%
    }
    .width_4{
      width:8%
    }
    .width_5{
      width:25%
    }
    .width_6{
      width:8%
    }
    .width_7{
      width:13%
    }

    .width_8{
      width:24%
    }
    .width_my_1_1{
      width:20%
    }
    .width_my_1_2{
      width:80%
    }
	.color_gray{
		background: #eee;
	}

  .width100{
    width: 100%;
  }
  }
  </style>
    